package org.example.hzit.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.*;


import javax.persistence.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author gww
 * @since 2025-01-16
 */
@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_order")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id
     */


    private Long orderId;

    /**
     * 实付金额。精确到2位小数;单位:元。如:200.07，表示:200元7分
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer payment;

    /**
     * 支付类型，1、在线支付，2、货到付款
     */
    private String paymentType;

    /**
     * 订单创建时间
     */
    private LocalDateTime createTime;

    /**
     * 订单更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 用户id
     */
    @Column(name = "userId")
    private String userId;


    @ManyToOne
    @JoinColumn(name = "userId", insertable = false, updatable = false)
    @TableField(exist = false)
    private User user;

}
